<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../script/bootstrap-3.3.7.min.css">
</head>
<style>
    div {
        margin: 10px;
        height: 100px;
        width: 100px;
        border: 1px solid #cccccc;
    }
</style>
<script>
    function add(a, b) {
        return a + b
    }

    // 不定长参数
    function addargs() {
        var sum =0
        for (var i in arguments) {
            sum +=arguments[i]
        }
        return sum
    }

    window.onload = function () {
        console.log(add(1, 2))
        console.log(addargs(1, 2))
    }
</script>
<body>

<div>

</div>
<div>

</div>
<div>

</div>


</body>
</html>